
//
//  B_ActivityThreeButtonView.m
//  DreamOf
//
//  Created by 薛小刚 on 2018/9/25.
//  Copyright © 2018年 薛小刚. All rights reserved.
//

#import "B_ActivityThreeButtonView.h"

@implementation B_ActivityThreeButtonView

+ (instancetype)initB_ActivityThreeButtonView {
    B_ActivityThreeButtonView * view = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil].lastObject;
    WeakSelf(weSelf, view);
    [view.B_leftButton layoutButtonWithEdgeInsetsStyle:MKButtonEdgeInsetsStyleLeft imageTitleSpace:10];
    [view.B_centerView addTapActionWithBlock:^(UIGestureRecognizer *gestureRecoginzer) {
        if (weSelf.B_ActivityFooterAction) {
            weSelf.B_ActivityFooterAction(1);
        }
    }];
    return view;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (IBAction)B_leftAction:(id)sender {
    if (self.B_ActivityFooterAction) {
        self.B_ActivityFooterAction(0);
    }
}

- (IBAction)B_rightAction:(id)sender {
    if (self.B_ActivityFooterAction) {
        self.B_ActivityFooterAction(2);
    }
}
@end
